package assignmentOne.thoughtworks;

/**
 * Created by derekgliwa on 6/15/14.
 */
public class Prework {

    public static void main(String[]args){
        printAsterisk();
        System.out.println();
        printHorizontal(8);
        System.out.println();
        printVertical(3);
        System.out.println();
        printRightTriangle(3);
    }

    public static void printAsterisk(){
        System.out.println("*");
    }

    public static void printHorizontal(int numOfAsterisks){
        for (int i = 0; i < numOfAsterisks; i++){
            System.out.print("*");
        }
    }

    public static void printVertical(int numOfAsterisks){
        for (int i = 0; i < numOfAsterisks; i++){
            System.out.print("*\n");
        }
    }

    public static void printRightTriangle(int numOfRows){
        for (int i = 0; i<numOfRows; i++){
            for (int j=0; j<i+1; j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
